from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import redis
from supermarket.config import Config

# 初始化Flask应用
app = Flask(__name__)
app.config.from_object(Config)

# 初始化SQLAlchemy
db = SQLAlchemy(app)

# 初始化Redis连接
redis_store = redis.StrictRedis(host=Config.REDIS_HOST, port=Config.REDIS_PORT, db=Config.REDIS_DB)

# 导入路由
from supermarket.app.routes import auth, suppliers, products, employees, purchases, stats
